/*package com.yksj.healthtalk.ui.salon;

import java.util.ArrayList;
import java.util.Arrays;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.RadioGroup;

import com.yksj.healthtalk.R;
import com.yksj.healthtalk.adapter.InterestAdapter;
import com.yksj.healthtalk.entity.TagEntity;
import com.yksj.healthtalk.utils.StringFormatUtils;

public class SalonSelectInterest extends Activity {

	private GridView mRightGridView;
	ArrayList<TagEntity> leftList;
	ArrayList<TagEntity> rightlist;
	private ArrayList<TagEntity> newlist;// 宸叉湁鐨�
	private InterestAdapter rightAdapter;
	private String[][] arrs;
	private GridView mUpGridView;
	private InterestAdapter upAdapter;
	private int flag;// 璁板綍涔嬪墠鐐瑰嚮宸﹁竟鐨刬term
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.salon_select_xingqu);
		queryData();
		init();
		
	}

	private void queryData() {
		String[] medicalArray = getResources().getStringArray(
				R.array.medicallevel);
		String[] sociologyArray = getResources().getStringArray(
				R.array.sociologylevel);
		String[] lifeArray = getResources()
				.getStringArray(R.array.lifelevel);
		String[] shopArray = getResources()
				.getStringArray(R.array.shoplevel);
		String[] cosmetologyArray = getResources().getStringArray(
				R.array.cosmetologylevel);
		String[] psychologyArray = getResources().getStringArray(
				R.array.psychologylevel);
		String[] emotionArray = getResources()
				.getStringArray(R.array.emotionlevel);
		String[] bisexualArray = getResources()
				.getStringArray(R.array.bisexuallevel);
		String[] workplaceArray = getResources().getStringArray(
				R.array.workplacelevel);
		String[] licaiArray = getResources().getStringArray(
				R.array.licailevel);
		String[] fashionArray = getResources()
				.getStringArray(R.array.fashionlevel);
		String[] travelingArray = getResources()
				.getStringArray(R.array.travelinglevel);
		String[] chuangyeArray = getResources().getStringArray(
				R.array.chuangyelevel);
		String[] interestArray = getResources()
				.getStringArray(R.array.interestlevel);
		arrs = new String[][] { medicalArray, sociologyArray, lifeArray,
				shopArray,cosmetologyArray, psychologyArray,emotionArray,bisexualArray,workplaceArray,
				licaiArray,fashionArray,travelingArray,chuangyeArray,interestArray};
	}

	private void init() {
		mRightGridView = (GridView) findViewById(R.id.right);
		mUpGridView = (GridView) findViewById(R.id.upgridview);
		mUpGridView.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {
				newlist.remove(position);
				upAdapter.notifyDataSetChanged();
			}
		});
		String[] family_title = getResources()
				.getStringArray(R.array.menulevel);
		leftList = StringFormatUtils.ArrayToArrayList(family_title);
		rightlist = new ArrayList<TagEntity>();
		newlist = new ArrayList<TagEntity>();
		rightAdapter = new InterestAdapter(this, rightlist,R.layout.grid_iterm_line, false);
		upAdapter = new InterestAdapter(this, newlist,R.layout.gridview_iterm_x, false);
		mUpGridView.setAdapter(upAdapter);
		mRightGridView.setAdapter(rightAdapter);

		mRightGridView.setOnItemClickListener(new OnItemClickListener() {
			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {
				String select = null;
				if(position==0){//鍒ゆ柇鏄惁鏄笉闄�
					if (newlist.contains(leftList.get(flag)))
						return;
					select=leftList.get(flag);
				}else{
					if(newlist.contains(rightlist.get(position))) return ;
					select=rightlist.get(position);
				}
				newlist.add(select);
				upAdapter.notifyDataSetChanged();
			}
		});
		initView();
	}

	private void initView(){
		RadioGroup radioGroup  = (RadioGroup)findViewById(R.id.type_group);
		radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
			@Override
			public void onCheckedChanged(RadioGroup group, int checkedId) {
				rightlist.clear();
				switch(checkedId){
				case R.id.all:
					flag=0;
					rightlist.add("鍏ㄩ儴");
					break;
				case R.id.yiliao:
					rightlist.addAll(Arrays.asList(arrs[0]));
					flag=1;
					break;
				case R.id.shehui:
					rightlist.addAll(Arrays.asList(arrs[1]));
					flag=2;
					break;
				case R.id.shenghuo:
					rightlist.addAll(Arrays.asList(arrs[2]));
					flag=3;
					break;
				case R.id.shop:
					rightlist.addAll(Arrays.asList(arrs[3]));
					flag=4;
					break;
				case R.id.meirong:
					rightlist.addAll(Arrays.asList(arrs[4]));
					flag=5;
					break;
				case R.id.xinli:
					rightlist.addAll(Arrays.asList(arrs[5]));
					flag=6;
					break;
				case R.id.qinggan:
					rightlist.addAll(Arrays.asList(arrs[6]));
					flag=7;
					break;
				case R.id.liangxing:
					rightlist.addAll(Arrays.asList(arrs[7]));
					flag=8;
					break;
				case R.id.zhichang:
					rightlist.addAll(Arrays.asList(arrs[8]));
					flag=9;
					break;
				case R.id.licai:
					rightlist.addAll(Arrays.asList(arrs[9]));
					flag=10;
					break;
				case R.id.shishang:
					rightlist.addAll(Arrays.asList(arrs[10]));
					flag=11;
					break;
				case R.id.lyou:
					rightlist.addAll(Arrays.asList(arrs[11]));
					flag=12;
					break;
				case R.id.chuangye:
					rightlist.addAll(Arrays.asList(arrs[12]));
					flag=13;
					break;
				case R.id.xingqu:
					rightlist.addAll(Arrays.asList(arrs[13]));
					flag=14;
					break;
				}
				rightAdapter.notifyDataSetChanged();
			}
		});
	}
}
*/